﻿namespace Genesis.Infrastructure.Application.Specifications
{

    public abstract class Specification : ISpecification
    {

        public abstract bool IsSatisfiedBy(object candidate);

        public ISpecification And(ISpecification and)
        {

            return new AndSpecification(this, and);

        }

        public ISpecification Or(ISpecification or)
        {

            return new OrSpecification(this, or);

        }

        public ISpecification Not()
        {

            return new NotSpecification(this);

        }

    }

}